"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".

Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
from userinfo.models import Schedule


class ScheduleTest(TestCase):
    def setUp(self):
        Schedule.objects.create(user='100001',from_time='2015-09-09 19:00',end_time='2015-09-10 20:00')

    def test_schedule_from_time(self):
        schedule = Schedule.objects.get(user='100001',from_time='2015-09-09 19:00')
        self.assertEqual(schedule.end_time,'2015-09-10 20:00')